package com.etc.Spring;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author 静静
 * @Description
 * @Date 2021/3/7  16:50
 **/
public class test {
    public static void main(String[] args) {

        ClassPathXmlApplicationContext cp = new ClassPathXmlApplicationContext("ApplicationContext.xml");


        User user = (User) cp.getBean("user");
        User bean = cp.getBean(User.class);

        System.out.println(bean);
    }

}
